C code for PEStartPrintJob and PECancelPrintJob

The following code provides an example of how to use PEStartPrintJob to start a print job, then how to use PECancelPrintJob to cancel it. Once a print job is started, it must finish before the next line of code in the procedure can execute. For this reason, PECancelPrintJob can only cancel the print job if executed from a different code procedure. For example, PEStartPrintJob may execute as the result of a Print button being clicked, while PECancelPrintJob can cancel the job as the result of a separate Cancel button being clicked. If PECancelPrintJob appears in the same event procedure as PEStartPrintJob, it will have no effect.

PEStartPrintJob

BOOL         waitUntilDone;
waitUntilDone = True;
    // waitUntilDone must always be True
if (!PEStartPrintJob(Job, waitUntilDone)){
    // Handle error
}

PECancelPrintJob

PECancelPrintJob(Job);


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com